package net.csdn.business.common.domain.issue.event;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import net.csdn.business.common.domain.issue.IssueExt;
import net.csdn.business.common.utils.BusinessUtil;

import java.util.List;

/**
 * @author likun
 * @date 2022/11/18 10:38
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@ToString(callSuper = true)
public class CommentEventDto extends BaseEventDto {
    /**
     * 评论内容
     */
    private String content;

    /**
     * 评论@username列表
     */
    private List<String> ats;

    public CommentEventDto(String id, String actionUid, Integer actionUserType, Long projectId, Integer serialNumber, String title, String content, IssueExt ext,List<String> ats) {
        super(id, actionUid, actionUserType, projectId, serialNumber, title);
        this.content = BusinessUtil.notifyContentSubstring(content);
        this.ats = ats;
        super.setExt(ext);
    }
}